﻿using System;
using System.Globalization;
using Orchard.ContentManagement;
using Orchard.ContentManagement.FieldStorage;
using Orchard.Environment.Extensions;

namespace Line20.DateTimeRangeField.Fields {
    [OrchardFeature("DateTimeRangeField")]
    public class DateTimeRangeField : ContentField {

        public DateTime? StartDateTime {
            get {
                var value = Storage.Get<DateTime>("StartDateTime");
                return value;
            }

            set { Storage.Set("StartDateTime", value); }
        }

        public DateTime? EndDateTime {
            get
            {
                var value = Storage.Get<DateTime>("EndDateTime");
                return value;
            }

            set { Storage.Set("EndDateTime", value); }
        }
    }
}